import React, { useEffect, useState } from "react";
import styles from "./index.module.scss";
import {Link} from "react-router-dom";

export default function Top(){
    const [cnt, setCnt] = useState(0);
    useEffect(() => {
        fetch("/list").then(rev => rev.json()).then(rev => {
            console.log("res", rev)
        })
    }, []);
    return <div className={styles.top}>
        <span className={styles.top_title}>标题</span>
        <nav>
            <Link to="page1">page1</Link>
            <Link to="/page2">page2</Link>
            <Link to="/page3">page3</Link>
        </nav>
    </div>;
}
